package com.bjx.system.domain.vo;

import com.bjx.common.core.domain.group.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @desc: 角色VO实体
 * @author: liushuai
 * @date: 2022/10/11
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(title = "RoleVO",description = "角色VO实体")
public class RoleVO  {
        /**
        * 角色ID
        */
        @NotNull(message = "角色ID不能为空",groups = Update.class)
        @Schema(title = "roleId",description = "角色ID")
        private  String roleId;
        /**
        * 角色名称
        */
        @NotNull(message = "角色名称不能为空")
        @Size(min = 1,max = 64,message = "角色名称长度为1到64个字符")
        @Schema(title = "roleName",description = "角色名称")
        private  String roleName; 
        /**
        * 是否启用(1:是/2:否)
        */
        @NotNull(message = "是否启用(1:是/2:否)不能为空")
        @Range(message = "是否启用(1:是/2:否)超出范围",min = 1,max = 2)
        @Schema(title = "enabled",description = "是否启用(1:是/2:否)")
        private  Short enabled; 
        /**
        * 角色编号
        */
        @NotNull(message = "角色编号不能为空")
        @Size(min = 1,max = 64,message = "角色编号长度为1到64个字符")
        @Schema(title = "roleCode",description = "角色编号")
        private  String roleCode; 
        /**
        * 顺序字段
        */
        @Range(message = "顺序字段超出范围",min = 1,max = 2147483647)
        @Schema(title = "orderNum",description = "顺序字段")
        private  Integer orderNum; 
}